<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <style>
      body,html{
         background-color: #fff;
       }
    </style>
</head>

<body>
    <!-- <header class="aui-bar aui-bar-nav aui-bar-light" id="aui-header">
        <a class="aui-btn aui-pull-left" tapmode onclick="closeWin()">
            <span style="color:#81B846;" class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title" style="color:#81B846;">农事</div>
        <div class="aui-btn aui-pull-right" style="width:48px;height:48px;margin-top:-4px;" tapmode onclick="openFrameSetting()">
            <img src="../../image/main/edit.png">
        </div>
    </header> -->
    <div class="aui-tab border-bottom" id="tab">
        <div class="aui-tab-item tab-fixed aui-active">我的</div>
        <div class="aui-tab-item tab-fixed">庆科农业智能主机</div>
        <div class="aui-tab-item tab-fixed">上药神象远程监测</div>
        <!-- <div class="aui-tab-item tab-fixed">自动化</div>
        <div class="aui-tab-item tab-fixed">自动化策略</div>
        <div class="aui-tab-item tab-fixed">安全策略</div> -->
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript">
    var tab = new auiTab({
        element: document.getElementById("tab"),
    }, function(ret) {
        api.setFrameGroupIndex({
            name: 'frame_farming_group',
            index: ret.index - 1,
            scroll: true
        });
    });
    apiready = function() {
        api.parseTapmode();
        var tabbar = $api.byId('tab');
        var tabbarPos = $api.offset(tabbar);
        var body_h = $api.offset($api.dom('body')).h;
        api.openFrameGroup({
            name: 'frame_farming_group',
            background: '#f8f8f8',
            scrollEnabled: false,
            rect: {
                x: 0,
                y:tabbarPos.h+80,
                w: 'auto',
                h: 'auto'
            },
            frames: [{
                name: 'alias',
                url: './farming/farming.html',
                bgColor: '#f8f8f8'
            }, {
                name: 'framefarming',
                url: './farming/framefarming_frm.html',
                bgColor: '#f8f8f8'
            }, {
                name: 'monitor',
                url: './farming/monitor_frm.html',
                bgColor: '#f8f8f8'
            }, {
                name: 'automation',
                url: './farming/automation_frm.html',
                bgColor: '#f8f8f8'
            }, {
                name: 'auto_strategy',
                url: './farming/auto_strategy_frm.html',
                bgColor: '#f8f8f8'
            }, {
                name: 'sec_strategy',
                url: './farming/sec_strategy_frm.html',
                bgColor: '#f8f8f8'
            }]
        }, function(ret, err) {
            var index = ret.index;
        });

    };

    function onNewFarming() {
        api.openWin({
            name: 'newFarming',
            url: './farming/newFarming_win.html'
        });
    }

    function closeWin() {
        api.closeWin({});
    }
</script>

</html>
